<template>
  <view class="page flex-col">
    <view class="box_2 flex-col">
      <view class="text-wrapper_1 flex-col">
        <text class="text_2">我的</text>
      </view>
      <view class="box_3 flex-col">
        <view class="group_1 flex-row justify-between">
          <image class="image_2" referrerpolicy="no-referrer" src="@/assets/lanhu_59wode/SketchPng6f2aecefd8f5bcf864e2ec4ac811f9d184b76e160d0a9613f5e565ad532a4512.png" />
          <view class="text-group_1 flex-col justify-between">
            <text class="text_3">昵称:{{ userInfo.name || '暂无填写'}}</text>
            <text class="text_4">联系方式:&nbsp;{{ userInfo.tel || '暂无填写'}}</text>
            <!-- <text class="text_4">简介:&nbsp;{{userInfo.personal_summary}}</text> -->
          </view>
        </view>
        <view class="group_2 flex-row" @click="goadd">
          <view class="text-wrapper_2 flex-col">
            <text class="text_5">编辑资料</text>
          </view>
        </view>
      </view>
    </view>
    <view class="box_4 flex-col">
      <view class="border-bottom icon-group" @click="goadd">
        <view class="image-text_1 flex-row justify-between" >
          <image
            class="thumbnail_3"
            referrerpolicy="no-referrer"
            src="@/assets/lanhu_59wode/SketchPng00b83cc18b09464f565e75573824753fd2127fc07ebc1a271611305fbd719d8e.png"
          />
          <view class="text-group_2 flex-col justify-between">
            <text class="text_6">简历填报</text>
            <text class="text_7">填写技能，展示自我</text>
          </view>
        </view>
      </view>
      <view class="border-bottom icon-group"  @click="gohistory">
        <view class="image-text_2 flex-row justify-between">
          <image
            class="thumbnail_4"
            referrerpolicy="no-referrer"
            src="@/assets/lanhu_59wode/SketchPngb3f6103af2d63a3694ab18d6d5a07f8f2be786bc1275fe709d3baa98deb32d2d.png"
          />
          <text class="text-group_3">投递记录</text>
        </view>
        <text class="text_8">丰富投递履历，增加就职成功率</text>
      </view>

      <view class="border-bottom icon-group" @click="goseek">
        <view class="image-text_3 flex-row justify-between">
          <image
            class="thumbnail_5"
            referrerpolicy="no-referrer"
            src="@/assets/lanhu_59wode/SketchPngccfd2c68fc3dfe3d53aa466af1e35b5bfc78118f3094c5aff04c050a17d0b56b.png"
          />
          <view class="text-group_4 flex-col justify-between">
            <text class="text_9">求职意向</text>
            <text class="text_10">详细的信息，更容易找到职位哦</text>
          </view>
        </view>
      </view>

      <view class="border-bottom icon-group" @click="gofavtor">
        <view class="image-text_4 flex-row justify-between" > 
          <image
            class="image_3"
            referrerpolicy="no-referrer"
            src="@/assets/lanhu_59wode/SketchPngc8e61df433669882b221bfe2def5a3d95bdad0c4c979ac5a1bf3c0cce7812ec3.png"
          />
          <view class="text-group_5 flex-col justify-between">
            <text class="text_11">我的收藏</text>
            <text class="text_12">我期望的岗位</text>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script setup lang="ts">
import '@/static/common.less';

import './index.less';
import { onMounted, ref } from 'vue';
import Taro, { useDidShow } from '@tarojs/taro';
import { resumedetail, loginapi } from '@/api/moredetail';
import MarkCard from '@/components/mark-card/index.vue';
import { Infouser } from "@/api/proto"
const showBuyAndDevPopup = ref(false);
const visible = ref(false);
let selfinfo = Taro.getStorageSync('useInfo')
const userInfo = ref({
  name:"",
  intentions:"",
  tel:""
});
const toUserSetting = () => {
  Taro.navigateTo({ url: '/pages/user/setting/index' });
};

const getUserInfo = () => {
  let usercontent = selfinfo && JSON.parse(selfinfo);
  resumedetail({ id: usercontent?.id || 4 }).then((res) => {
    userInfo.value = res;
  });
};
const gofavtor = () =>{
  Taro.navigateTo({ url: '/pages/userinfo/favtorwork/index' });
}
const gohistory = () =>{
  Taro.navigateTo({ url: '/pages/userinfo/history/index' });
}
const goadd = () => {
  Taro.navigateTo({ url: '/pages/userinfo/baseinfo/index' });
};
const goseek = () => {
  Taro.setStorageSync('seek', JSON.stringify(userInfo.value?.intentions));
  Taro.navigateTo({ url: '/pages/userinfo/seek/index' });
};

// getUserInfo();
useDidShow(() => {
  getUserInfo();
});
</script>
